package account

import (
	"context"

	"gitee.com/spume/common_service/app/billing/api/account/v1"
	"gitee.com/spume/common_service/app/billing/internal/model/do"
	"gitee.com/spume/common_service/app/billing/internal/service"
	"github.com/gogf/gf/v2/util/gconv"
)

func (c *ControllerV1) AccountCreate(ctx context.Context, req *v1.AccountCreateReq) (res *v1.AccountCreateRes, err error) {
	in := new(do.WalletAccount)
	if err = gconv.Struct(req, in); err != nil {
		return
	}

	_, err = service.WalletAccount().Create(ctx, in)

	return
}
